%=============================================================
% Helper function to produce a 2D matrix from a 2D cell array
%=============================================================
function matrix = getMatrix(data)

    matrix = [];

    for i=1:numel(data)
        for j=1:numel(data{i})
            matrix(j,i)=data{i}(j);
        end
    end

end